package chapter1;

public class Fibonacci {
	
	static final int MAX = 50;//class level

	/**
	 * Print out the Fibonacci sequence for values < MAX
	 * @param args
	 */
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		
		//ONLY 2 local variables
		int lo = 1;
		int hi = 1;
		
		System.out.println(lo);
		while(hi < MAX){
			System.out.println(hi);
			hi = lo + hi; //new hi
			lo = hi - lo; //new lo that is the old hi
		}
	}

}
